package ru.pstu.itas.themerchant;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class TagsActivity extends Activity {

	Shop shop = null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		View.OnClickListener listener = new View.OnClickListener() {
			public void onClick(View v) {
				showItems(((Button) v).getText().toString());
			}
		};
		setContentView(new TagsView(this, getAssets(), listener));
	}

	public void showItems(String tag) {
		Intent intent = new Intent();
		intent.setClass(this, ItemsActivity.class);
		intent.putExtra(ItemsActivity.TAG_FIELD, tag);
		startActivity(intent);
	}

}